import request from '@/utils/request';

// 查询自定义专属指标配置列表
export function list(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/customExclusiveIndicator',
		method: 'post',
		data: data,
	});
}

// 新增自定义专属指标配置
export function add(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/customExclusiveIndicator/save',
		method: 'post',
		data: data,
	});
}

// 修改自定义专属指标配置
export function edit(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/customExclusiveIndicator',
		method: 'put',
		data: data,
	});
}

// 删除自定义专属指标配置
export function remove(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/customExclusiveIndicator/delete/' + ids,
		method: 'delete',
	});
}

// 查询所有展示字段（步骤查询页面，详单查询，基础告警查询页面）
export function getAllCustomDisplayFields(type: any): ApiPromise<ApiResponse> {
	return request({
		url: '/api/modules/search/Indicator/getAllCustomDisplayFields/' + type,
		method: 'get',
	});
}
